home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1995 January / macformat-020.iso / Shareware City / Developers / OutOfPhase1.01Source / OutOfPhase Folder / ExecuteSynthesis.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-10-01  |  2.8 KB  |  87 lines  |  [TEXT/KAHL]

  1. /* ExecuteSynthesis.h */
  2.  
  3. #ifndef Included_ExecuteSynthesis_h
  4. #define Included_ExecuteSynthesis_h
  5.  
  6. /* ExecuteSynthesis module depends on */
  7. /* MiscInfo.h */
  8. /* Audit */
  9. /* Debug */
  10. /* Definitions */
  11. /* FixedPoint */
  12. /* BinaryCodedDecimal */
  13. /* Memory */
  14. /* MainWindowStuff */
  15. /* LinearTransition */
  16. /* PlayTrackInfoThang */
  17. /* Array */
  18. /* WaveTableOscControl */
  19. /* EnvelopeState */
  20. /* LFOGenerator */
  21. /* InstrList */
  22. /* InstrObject */
  23. /* TrackObject */
  24. /* SampleOscControl */
  25. /* ModulationOscControl */
  26. /* Fractions */
  27. /* FrameObject */
  28. /* DeterminedNoteStructure */
  29. /* TempoController */
  30. /* OscBankPlayer */
  31. /* DataMunging */
  32. /* Alert */
  33. /* CheckNameUniqueness */
  34. /* ErrorDaemon */
  35.  
  36. /* this module is the entrypoint for actually doing synthesis. */
  37.  
  38. #include "FixedPoint.h"
  39. #include "BinaryCodedDecimal.h"
  40.  
  41. /* forwards */
  42. struct MainWindowRec;
  43. struct CodeCenterRec;
  44. struct FunctionListRec;
  45. struct SampleListRec;
  46. struct AlgoSampListRec;
  47. struct WaveTableListRec;
  48. struct AlgoWaveTableListRec;
  49. struct InstrListRec;
  50. struct ArrayRec;
  51. struct TrackListRec;
  52. struct TrackObjectRec;
  53. struct ErrorDaemonRec;
  54.  
  55. typedef enum
  56.     {
  57.         eSynthDone EXECUTE(= -4325),
  58.         eSynthNoMemory, /* not enough memory to build internal structures for playback */
  59.         eSynthUserCancelled, /* user cancelled via the periodic callback */
  60.         /* eSynthProgramError, */ /* an inconsistency exists in the track */
  61.         eSynthPrereqError, /* the sample/func/instrs couldn't be built */
  62.         eSynthUndefinedInstrumentError, /* the named instrument does not exist */
  63.         eSynthDataSubmitError, /* some error (perhaps disk error) occurred during callback */
  64.         eSynthDuplicateNames /* some objects have the same name */
  65.     } SynthErrorCodes;
  66.  
  67. /* This routine does all of the work. */
  68. /* The DataOutCallback is called every time a block of data is */
  69. /* ready to be sent to the target device; this is provided so that data can be */
  70. /* redirected to a file or postprocessed in some way before playback. */
  71. /* the KeyTrack and FrameToStartAt provide a reference point indicating where */
  72. /* playback should occur.  if KeyTrack is NIL, then playback begins at the beginning. */
  73. /* the rate parameters are in operations per second. */
  74. SynthErrorCodes                Synthesizer(struct MainWindowRec* MainWindow,
  75.                                                 MyBoolean (*DataOutCallback)(void* Refcon,
  76.                                                     largefixedsigned* DataBlock, long NumFrames,
  77.                                                     MyBoolean* AbortPlaybackFlagOut),
  78.                                                 void* DataOutRefcon, struct ArrayRec* ListOfTracks,
  79.                                                 struct TrackObjectRec* KeyTrack, long FrameToStartAt,
  80.                                                 long SamplingRate, long EnvelopeRate, MyBoolean UseStereo,
  81.                                                 LargeBCDType DefaultBeatsPerMinute,
  82.                                                 LargeBCDType OverallVolumeScalingReciprocal,
  83.                                                 MyBoolean InterpOverTime, MyBoolean InterpAcrossWaves,
  84.                                                 LargeBCDType ScanningGap, struct ErrorDaemonRec* ErrorDaemon);
  85.  
  86. #endif
  87.